package com.zytlifeservice.config;

import com.qianmi.open.api.DefaultOpenClient;
import com.qianmi.open.api.OpenClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by MJS on 2017/7/20.
 */
@Configuration
public class OutBeanConfiguration {
    @Autowired
    private QianmiConfig qianmiConfig;

    @Bean
    public OpenClient generateBMClient() {
        return new DefaultOpenClient(qianmiConfig.getBm_api_url(), qianmiConfig.getApp_secret());
    }
}
